package com.linlin.shortlink.project.controller;import com.linlin.shortlink.project.common.convention.result.Result;import com.linlin.shortlink.project.common.convention.result.Results;import com.linlin.shortlink.project.service.UrlTitleService;import lombok.RequiredArgsConstructor;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestParam;import org.springframework.web.bind.annotation.RestController;@RestController@RequiredArgsConstructorpublic class UrlTitleController {    private final UrlTitleService urlTitleService;    /**     * 根据url获取title     * @param url url     * @return title     */    @RequestMapping("/api/short-link/v1/title")    public Result<String> getTitleByUrl(@RequestParam("url") String url) {        return Results.success(urlTitleService.getTitleByUrl(url));    }}